/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

	PEANUT CONTROL DEFINITION

	Copyright(c) 1997-2003 BNSoft Corp.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

#ifndef		_BNSOFT_PEANUT_CTRLDEF_H_
#define		_BNSOFT_PEANUT_CTRLDEF_H_

typedef enum
{
	CTRLTYPE_NONE						= 0,
	CTRLTYPE_BUTTON,
	CTRLTYPE_CHECK,
	CTRLTYPE_COMBOBOX,
	CTRLTYPE_FRAME,
	CTRLTYPE_DIALOG,
	CTRLTYPE_ICON,
	CTRLTYPE_IMAGE,
	CTRLTYPE_LINE,
	CTRLTYPE_LIST,
	CTRLTYPE_POPUP,
	CTRLTYPE_RADIO,
	CTRLTYPE_REDIT,
	CTRLTYPE_SCROLLBAR,
	CTRLTYPE_SEL,
	CTRLTYPE_TAB,
	CTRLTYPE_TEXT,
	CTRLTYPE_KEYPAD,
	CTRLTYPE_LISTVIEW,
	CTRLTYPE_USERDEF,
	CTRLTYPE_MAXNUM
} E_CTRLTYPE;

#define		CTRLTYPE_EDIT			CTRLTYPE_REDIT

typedef enum
{
	CTRLMSG_NONE						= 0,
	CTRLMSG_PAINT,
	CTRLMSG_KEYDOWN,
	CTRLMSG_TIMER,
	CTRLMSG_DESTROY,
	CTRLMSG_SETFOCUS,
	CTRLMSG_KILLFOCUS,
	CTRLMSG_OEMNOTIFY,
	CTRLMSG_MAXNUM				= 0x80000000
} E_CTRLMSG;

#define		CTRLTYPE_EDIT			CTRLTYPE_REDIT

#define		NOTIMASK_ERASEBKGND		0x80000000	
#define		NOTIMASK_POSTDRAW		0x40000000	
#define		NOTIMASK_PREKEY			0x20000000	
#define		NOTIMASK_POSTKEY		0x10000000	
#define		NOTIMASK_TITLEDRAW		0x01000000	
#define		NOTIMASK_HASVSCROLL		0x00000001	
#define		NOTIMASK_PREPOINTNG		0x00800000
#define		NOTIMASK_POSTPOINTNG		0x00400000	

typedef enum
{
	NOTIMSG_NONE				= 0,

	//	Messages for SysNotify
	NOTIMSG_CREATE,
	NOTIMSG_DESTROY,
	NOTIMSG_DRAW,
	NOTIMSG_KEYDOWN,
	NOTIMSG_LONGKEYDOWN,
	NOTIMSG_TIMER,
	NOTIMSG_POINTINGDOWN,
	NOTIMSG_POINTINGUP,
	NOTIMSG_POINTINGMOVE,
	NOTIMSG_POINTINGLONG,
	NOTIMSG_POINTINGTIMER,
	NOTIMSG_POINTING_ZOOM_IN,
	NOTIMSG_POINTING_ZOOM_OUT,
	NOTIMSG_POINTING_ZOOM_START,
	NOTIMSG_POINTING_ZOOM_END,
	NOTIMSG_SETFOCUS,
	NOTIMSG_KILLFOCUS,
	NOTIMSG_OEMNOTIFY,
	NOTIMSG_OEMTYPECHANGED,
	NOTIMSG_RANGECHANGED,
	NOTIMSG_FONTCHANGED,
	NOTIMSG_STYCHANGED,
	NOTIMSG_CHILDRANGECHANGED,
	NOTIMSG_PERIODICUPDATE,
	NOTIMSG_LASTMSG						= 0x80000000
} E_NOTIMSG_I;

typedef QUAD	E_NOTIMSG; 

//	Messages for AppNotify
#define		NOTIMSG_ERASEBKGND		NOTIMASK_ERASEBKGND
#define		NOTIMSG_POSTDRAW		NOTIMASK_POSTDRAW
#define		NOTIMSG_PREKEY			NOTIMASK_PREKEY
#define		NOTIMSG_POSTKEY			NOTIMASK_POSTKEY
#define		NOTIMSG_TITLEDRAW		NOTIMASK_TITLEDRAW

#define		CTRLSTATE_VISIBLE		0x80000000		
#define		CTRLSTATE_ENABLE		0x40000000	
#define		CTRLSTATE_CANFOCUS		0x20000000	
#define		CTRLSTATE_FOCUSED		0x00800000		

#define		CTRLSTATE_CANSETFOCUS		(CTRLSTATE_VISIBLE | CTRLSTATE_ENABLE | CTRLSTATE_CANFOCUS)
#define		CTRLSTATE_PRESSED		0x00008000	
#define		CTRLSTATE_LEFTPRESSED		0x00004000	
#define		CTRLSTATE_RIGHTPRESSED		0x00002000		

enum
{
	USERDEF_NONE		= -1,
	USERDEF_TIMECTRL,
	USERDEF_MONTHCTRL,
	USERDEF_MAX,
	USERDEF_MASK		= 0x7FFFFFFF
};

#define		CTRLFONT_DEFAULT			FONT_20


#endif	//	_BNSOFT_PEANUT_CTRLDEF_H_
